#include "screenraw2valueby130.h"

namespace cores
{
    namespace devices
    {
        ScreenRaw2ValueBy130PIN globalInstance;
        ScreenRaw2ValueBy130PIN::ScreenRaw2ValueBy130PIN(const u_int32_t &screenNumber_)
            : SR2ValHelper(screenNumber_)
        {
            init();
        }

        ScreenRaw2ValueBy130PIN::ScreenRaw2ValueBy130PIN(const string &screen_type_)
            : SR2ValHelper(screen_type_)
        {
            init();
        }

        ScreenRaw2ValueBy130PIN::~ScreenRaw2ValueBy130PIN()
        {}

        void ScreenRaw2ValueBy130PIN::init()
        {
            /* 添加金额 */
            _amounts.reserve(8);
            _amounts.push_back(new SRNumData({8, 7, 6, 5, 4, 10, 9}));
            _amounts.push_back(new SRNumData({18, 17, 16, 15, 14, 20, 19}));
            _amounts.push_back(new SRNumData({28, 27, 26, 25, 24, 30, 29}));
            _amounts.push_back(new SRNumData({39, 38, 37, 36, 35, 41, 40}));
            _amounts.push_back(new SRPtData(44));
            _amounts.push_back(new SRNumData({48, 47, 46, 45, 51, 50, 49}));
            _amounts.push_back(new SRPtData(53));
            _amounts.push_back(new SRNumData({56, 55, 58, 54, 60, 59, 57}));

            /* 添加油量 */
            _volumes.reserve(8);
            _volumes.push_back(new SRNumData({2, 1, 125, 124, 123, 122, 3}));
            _volumes.push_back(new SRNumData({12, 11, 121, 120, 119, 118, 13}));
            _volumes.push_back(new SRNumData({22, 21, 116, 115, 114, 106, 23}));
            _volumes.push_back(new SRNumData({32, 31, 80, 79, 78, 77, 34}));
            _volumes.push_back(new SRPtData(76));
            _volumes.push_back(new SRNumData({43, 42, 71, 75, 74, 73, 52}));
            _volumes.push_back(new SRPtData(72));
            _volumes.push_back(new SRNumData({65, 61, 67, 70, 69, 68, 66}));

            /* 添加单价 */
            _prices.reserve(5);
            _prices.push_back(new SRNumData({113, 112, 111, 110, 109, 108, 107}));
            _prices.push_back(new SRNumData({82, 81, 84, 103, 102, 101, 83}));
            _prices.push_back(new SRPtData(100));
            _prices.push_back(new SRNumData({87, 86, 85, 99, 98, 97, 88}));
            _prices.push_back(new SRNumData({90, 89, 92, 95, 94, 93, 91}));
        }
    }
}